package com.example.controller;

import com.example.domain.pojo.Order;
import com.example.service.IOrderProducer;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;

/**
 * @author ljs
 * @date 2025/7/16
 */
@RestController
@RequestMapping("order")
public class ProductorController {

    @Autowired
    private  IOrderProducer orderProducer;

    @PostMapping("/create")
    public void sendOrder(@RequestBody Order order) {
        orderProducer.sendOrder(order);
    }

    @GetMapping("/test")
    public String test(){
        return "test";
    }

}
